package artid.com.arttogo.bean;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;

public class NewsList extends AppItem implements Serializable {
	String id = "";
	String title= "";;
	String create_time= "";;
	String top= "";;
	String catname= "";;
	String commentNum= "";;
	String scanNum= "";;
	ArrayList<String> imgUrl;


	@Override
	public void parse(JSONObject obj) {
		if (null == obj) {
			return;
		}
		imgUrl= new ArrayList<String>();
		id = obj.optString("id");
		
		title = obj.optString("title");
		create_time = obj.optString("create_time");
		top = obj.optString("top");
		catname = obj.optString("catname");
		commentNum = obj.optString("commentNum");
		scanNum = obj.optString("scanNum");
		JSONArray imgarr = obj.optJSONArray("imgUrl");
		if (imgarr==null) {
			return;
		}
		for (int i = 0; i < imgarr.length(); i++) {
			String item = imgarr.optString(i);
			imgUrl.add(item);
		}
//		description = obj.optString("description");

	}


	public ArrayList<String> getImgUrl() {
		return imgUrl;
	}


	public void setImgUrl(ArrayList<String> imgUrl) {
		this.imgUrl = imgUrl;
	}


	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}


	public void setTitle(String title) {
		this.title = title;
	}


	public String getCreate_time() {
		return create_time;
	}


	public void setCreate_time(String create_time) {
		this.create_time = create_time;
	}


	public String getTop() {
		return top;
	}


	public void setTop(String top) {
		this.top = top;
	}


	public String getCatname() {
		return catname;
	}


	public void setCatname(String catname) {
		this.catname = catname;
	}


	public String getCommentNum() {
		return commentNum;
	}


	public void setCommentNum(String commentNum) {
		this.commentNum = commentNum;
	}


	public String getScanNum() {
		return scanNum;
	}


	public void setScanNum(String scanNum) {
		this.scanNum = scanNum;
	}




	

}
